package com.design.mode.factory.car;

public class AudiCarFactory extends AbsAudiCarFactory {

	@Override
	public <T extends AudiCar> T createAudiCar(Class<T> cl) {
		AudiCar audiCar = null;

		try {
			audiCar =  (AudiCar) Class.forName(cl.getName()).newInstance();
		} catch (InstantiationException | IllegalAccessException
				| ClassNotFoundException e) {
			e.printStackTrace();
		}
		return (T) audiCar;
	}

}
